package cn.com.ege.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.ege.mvc.exception.BusinessException;
import cn.com.ege.mvc.model.business.Material;
import cn.com.ege.mvc.service.BaseService;

public class MaterialService extends BaseService<Material> implements Serializable{
	public void save(Material m) throws BusinessException{
		if (null != m && null != m.getMaterial_id()) {
			if(null != m.getId()&& 0 != m.getId()){
				update(m);
			}else{
				add(m);
			}
		}else {
			throw new BusinessException("料号不能为空");
		}
	}
}
